﻿
@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>我的收获地址</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!--标准mui.css-->
    <link href="~/css/mui.min.css" rel="stylesheet" />
    <link href="~/css/app.css" rel="stylesheet" />
</head>
<body >
    <header class="mui-bar mui-bar-nav">
        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
        <h1 class="mui-title">我的收获地址</h1>
        <a href="/Receiveaddress/UpDateAddress" class="mui-icon mui-icon-plusempty mui-pull-right" style="color:#000;font-size:30PX;margin-top:-5px; font-weight:bold;"></a>
    </header>
    <div class="mui-content">
        <ul id="OA_task_2" class="mui-table-view">
            @foreach (var item in ViewBag.List)
            {
                <li class="mui-table-view-cell" style="padding:0px;">
                    <div class="mui-card-header mui-card-media">
                        <div class="mui-media-body" style="width:80%;margin-left:10px;">
                            <b> @item.ReNames</b>  @item.Rephone
                            @if (item.defaultaddress == "true")
                            {
                                <p><b style="color:red;">默认</b>  @item.province @item.citys @item.areas   @item.detailaddres</p>
                            }
                            else
                            {
                                <p>@item.province @item.citys @item.areas   @item.detailaddres</p>
                            }
                        </div>
                    </div>
                    <button type="button" class="mui-btn" style="border:0px;background-color:#fff;color:#007aff">
                        编辑
                    </button>
                    <input type="hidden" value="@item.ID" />
                </li>
            }
        </ul>
    </div>
    <script src="~/js/mui.min.js"></script>
    <script>
        mui.init();
        (function ($) {
           
            //第一个demo，拖拽后显示操作图标，点击操作图标删除元素；
            $('#OA_task_2').on('tap', '.mui-btn', function (event) {
                var elem = this;
                var li = elem.nextSibling.nextSibling;
                location.href = "/Receiveaddress/UpDateAddress?ID=" + li.value;
              
            });
        })(mui);
        function reurl() {
            url = location.href;
            var times = url.split("?t=");
            if (times[1] != 1) {
                url += "?t=1";
                self.location.replace(url);
            }
        }
        onload = reurl;
    </script>
</body>

</html>
